﻿using System;
using System.Collections.Generic;
using System.Text;
using Meqs.Entity;
using Meqs.Logic.Interface;
using Meqs.Entity.Parameters;

namespace Meqs.Logic.Interface
{
    public interface ITeacherEvalSubmitRecordLogic : ICommonLogic<TeacherEvalSubmitRecord, int>
    {
        /// <summary>
        ///  获取教师评价提交记录
        /// </summary>
        /// <param name="reportType"></param>
        /// <param name="year"></param>
        /// <param name="month"></param>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        TeacherEvalSubmitRecord GetRecordByMonth(int reportType, int year, int month, int? schoolYear, int? term, string schoolMark);
        TeacherEvalSubmitRecord GetRecordByMonth(int historyId, int teacherId, int managerId, int reportType, int year, int month, int? schoolYear, int? term, string schoolMark);
        TeacherEvalSubmitRecord GetRecordByTerm(int historyId, int teacherId, int managerId, int reportType, int year, int month, int? schoolYear, int? term, string schoolMark);
        /// <summary>
        /// 保存记录
        /// </summary>
        /// <param name="list"></param>
        /// <param name="causeID"></param>
        /// <param name="clsID"></param>
        /// <param name="reportType"></param>
        /// <param name="year"></param>
        /// <param name="month"></param>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <param name="teacherID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        bool SaveOrUpdateRecord(IList<VItems> list, int historyId, int reportType, int year, int month, int? schoolYear, int? term, int ManagerID, string schoolMark);

        /// <summary>
        /// 添加一个提交记录
        /// </summary>
        /// <param name="moralitySubmitRecord"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        int InsertTeacherEvalSubmitRecord(TeacherEvalSubmitRecord moralitySubmitRecord, string schoolMark);


        /// <summary>
        /// 清空记录
        /// </summary>
        /// <param name="recordID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        int DeleteAllRecord(int recordID, string schoolMark);


        /// <summary>
        /// 获取学生评教的教师评估数据
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="clsId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        IList<TeacherEvalSubmitRecord> ValidateTeachIsEvaluate(int historyID, string schoolMark, int clsId, int userId);


        /// <summary>
        /// 获取学生评教的教师评估数据
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="clsId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int ValidateTeachIsEvaluate(string schoolMark, int historyId, int managerId, int teacherId);
    }
}
